﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TimeTracker_Entities;

namespace TimeTracker_BL.Repositories
{
    
    public interface ITimeTrackerRepository
    {
        /// <summary>
        /// Gets all time entries.
        /// </summary>
        /// <returns>A list of <see cref="TimeEntry"/> objects</returns>
        IList<TimeEntry> GetAllTimeEntries();

        /// <summary>
        /// Gets all time entries after.
        /// </summary>
        /// <param name="startDate">The start date.</param>
        /// <param name="endDate">The end date.</param>
        /// <returns>
        /// A list of <see cref="TimeEntry"/> objects
        /// </returns>
        IList<GetTimesheetReportDataByWeek_Result> GetAllTimeEntriesBetween(DateTime startDate, DateTime endDate);

        /// <summary>
        /// Adds the entry.
        /// </summary>
        /// <param name="entryToAdd">The entry to add.</param>
        /// <param name="userId">The user id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult AddEntry(TimeEntry entryToAdd, string userId);

        /// <summary>
        /// Updates the entry.
        /// </summary>
        /// <param name="updatedEntry">The updated entry.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult UpdateEntry(TimeEntry updatedEntry);

        /// <summary>
        /// Deletes the entry.
        /// </summary>
        /// <param name="timeEntryId">The time entry id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult DeleteEntry(int timeEntryId);

        /// <summary>
        /// Gets the clients.
        /// </summary>
        /// <returns>a list of <see cref="Client"/> objects.</returns>
        IList<Client> GetClients();

        /// <summary>
        /// Adds the client.
        /// </summary>
        /// <param name="clientToAdd">The client to add.</param>
        /// <param name="userId">The user id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult AddClient(Client clientToAdd);

        /// <summary>
        /// Updates the client.
        /// </summary>
        /// <param name="updatedClient">The updated client.</param>
        /// <param name="userId">The user id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult UpdateClient(Client updatedClient);

        /// <summary>
        /// Deletes the client.
        /// </summary>
        /// <param name="clientId">The client id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult DeleteClient(int clientId);

        /// <summary>
        /// Gets the projects.
        /// </summary>
        /// <returns>a list of <see cref="Project"/> objects.</returns>
        IList<Project> GetProjects();

        /// <summary>
        /// Adds the Project.
        /// </summary>
        /// <param name="projectToAdd">The Project to add.</param>
        /// <param name="userId">The user id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult AddProject(Project projectToAdd);

        /// <summary>
        /// Updates the Project.
        /// </summary>
        /// <param name="updatedProject">The updated Project.</param>
        /// <param name="userId">The user id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult UpdateProject(Project updatedProject);

        /// <summary>
        /// Deletes the Project.
        /// </summary>
        /// <param name="ProjectId">The Project id.</param>
        /// <returns>
        /// An <see cref="IOpResult"/> object containing data including whether or 
        /// not the operation was successful and any error messages.
        /// </returns>
        IOpResult DeleteProject(int projectId);
    }
}
